diff --git a/django/db/models/base.py b/django/db/models/base.py
index 3ce711f3f1..589f29c945 100644
--- a/django/db/models/base.py
+++ b/django/db/models/base.py
@@ -1707,6 +1707,9 @@ class Model(metaclass=ModelBase):
             _cls = cls
             fld = None
             for part in field.split(LOOKUP_SEP):
+                if part == 'pk':
+                    fld = _cls._meta.pk
+                    continue
                 try:
                     fld = _cls._meta.get_field(part)
                     if fld.is_relation:
